package it.polimi.traveldream.web;

import it.polimi.traveldream.GestioneHotelLocal;
import it.polimi.traveldream.HotelDTO;

import javax.ejb.EJB;
import javax.faces.bean.ManagedBean;
import javax.faces.bean.RequestScoped;

@ManagedBean(name="hotelBean")
@RequestScoped
public class HotelBean {
	
	@EJB
	private GestioneHotelLocal gestioneHotelLocal;
	
	private HotelDTO current;
	
	public HotelBean() {
		this.current = new HotelDTO();

	}
	public String create() {
		gestioneHotelLocal.add(current);
		return "/employee/index.xhtml?faces-redirect=true";
		
	}
	
	public HotelDTO getCurrent() {
		return current;
	}
	
	public void setCurrent(HotelDTO current) {
		this.current = current;
	}

}
